﻿using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Activation;
using Acaweb.Common;
using Acaweb.Model.Entities;
using Acaweb.Servicios.Contracts;
using Components = Acaweb.Componentes.Contracts;

namespace Acaweb.Servicios.Services
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class MateriasService : IMateriasService
    {
        Components.IMateriasService _MateriasComponent = AppCtx.Resolve<Components.IMateriasService>();

        public List<Materias> GetAll()
        {
            return _MateriasComponent.GetAll().ToList();
        }

        public Materias GetById(int Id)
        {
            return _MateriasComponent.GetById(Id);
        }

        public List<Materias> GetHabilitadas(int CodigoEstudiante)
        {
            return _MateriasComponent.MateriasHabilitadas(AuthenticationService.GetCurrent().ToInt()).ToList();
        }
    }
}